package com.cdcas;

interface IMessage extends AutoCloseable {
    public void send(String msg);
}
class NetMessage implements IMessage {


    @Override
    public void send(String msg) {
        System.out.println("发送数据:" + msg);
    }

    @Override
    public void close() throws Exception {

    }
    public NetMessage() {
        System.out.println("创建连接****");
    }
}

public class NetHandle {
    public static void main(String[] args) {
        NetMessage netMessage = new NetMessage();
        netMessage.send("你好");
        SingletonDemo.getInstance();
    }
}
